﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_XuatChuyen : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("C1NumericEdit1")]
        private C1NumericEdit _C1NumericEdit1;
        [AccessedThroughProperty("CboKhoNhap")]
        private ComboBox _CboKhoNhap;
        [AccessedThroughProperty("CboKhoXuat")]
        private ComboBox _CboKhoXuat;
        [AccessedThroughProperty("CboLoaiDuLieu")]
        private ComboBox _CboLoaiDuLieu;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdChuyen")]
        private Button _CmdChuyen;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("ImageList1")]
        private ImageList _ImageList1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("PNDungChung")]
        private Panel _PNDungChung;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripButton2")]
        private ToolStripButton _ToolStripButton2;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtNguoiGiao")]
        private TextBox _TxtNguoiGiao;
        [AccessedThroughProperty("TxtNguoiNhan")]
        private TextBox _TxtNguoiNhan;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoLuong")]
        private C1NumericEdit _TxtSoLuong;
        [AccessedThroughProperty("TxtTienHang")]
        private C1NumericEdit _TxtTienHang;
        [AccessedThroughProperty("TxtTienHangNT")]
        private C1NumericEdit _TxtTienHangNT;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        [AccessedThroughProperty("VSHangHoa")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSHangHoa;
        private string cFrmFormat;
        private int cFrmGhiSo;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private string mLoaiChungTu;
        private clsDMDonViTinh objDVT;
        private clsDMHangHoa objHH;
        private clsSoChungTu objSoCT;
        private clsXuatChuyenKho objXCK;
        private clsXuatChuyenKhoChiTiet objXCKCT;
        private DataTable pDT;
        private string pKhoa;

        public Frm_XuatChuyen()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_XuatChuyen_KeyDown);
            base.Load += new EventHandler(this.Frm_XuatChuyen_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mLoaiChungTu = "XKHH";
            this.objSoCT = new clsSoChungTu();
            this.cFrmKhoa = "";
            this.pKhoa = "";
            this.cFrmKhoaOld = "";
            this.objHH = new clsDMHangHoa();
            this.objDVT = new clsDMDonViTinh();
            this.objXCK = new clsXuatChuyenKho();
            this.objXCKCT = new clsXuatChuyenKhoChiTiet();
            this.cFrmGhiSo = 0;
            this.cFrmTask = "";
            this.InitializeComponent();
        }

        private void CboKhoNhap_SelectedIndexChanged(object sender, EventArgs e)
        {
            if ((LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoNhap.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "") && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoNhap.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoXuat.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim()))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kho nhập phải kh\x00e1c kho xuất! Bạn phải chọn lại kho nhập.", ""));
                this.CboKhoNhap.SelectedValue = "";
                this.CboKhoNhap.Focus();
            }
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (strCode != "")
                {
                    clsDMLoaiTien tien = new clsDMLoaiTien();
                    tien.LoadByCode(strCode);
                    if (tien.SoLe > 0)
                    {
                        this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("##########", tien.SoLe);
                    }
                    if (tien.TienViet == 1)
                    {
                        this.txtTyGia.Enabled = false;
                    }
                    this.txtTyGia.Value = tien.TyGia;
                    this.FormatNumber();
                }
            }
        }

        public bool CheckGrid()
        {
            if (this.VSHangHoa.Rows.Count == 1)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập h\x00e0ng h\x00f3a cần xuất chuyển!", ""));
                this.CmdAddRow.Focus();
                return false;
            }
            return true;
        }

        public bool CheckIvalid()
        {
            if (!LVYModule.CheckDateLock(LVYModule.Date2Char(this.TxtNgayChungTu.Text)))
            {
                return false;
            }
            if (LVYModule.ReturnIfNull(this.TxtSoChungTu.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số chứng từ!", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (this.objXCK.IsDuplicateVoucherNo(this.TxtSoChungTu.Text, this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số chứng từ n\x00e0y đ\x00e3 tồn tại, bạn h\x00e3y nhập số chứng từ kh\x00e1c!", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn loại tiền!", ""));
                this.CboLoaiTien.Focus();
                return false;
            }
            if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập tỷ gi\x00e1 nguy\x00ean tệ!", ""));
                this.txtTyGia.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(this.TxtNguoiGiao.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00ean người giao!", ""));
                this.TxtNguoiGiao.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(this.TxtNguoiNhan.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00ean người nhận!", ""));
                this.TxtNguoiNhan.Focus();
                return false;
            }
            if (!this.CheckGrid())
            {
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.cFrmKhoa = modGeneral.CreatKey("ST_XuatChuyenKho", 15, "XCK");
            this.objSoCT.Load(this.mLoaiChungTu);
            this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            this.CboKhoXuat.SelectedValue = LVYModule.ReturnIfNull(modGeneral.H_STOCKID, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            this.EnabledControl = true;
            this.TxtSoChungTu.Focus();
            this.cFrmTask = "I";
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn loại tiền!", ""));
                this.CboLoaiTien.Focus();
            }
            else if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoXuat.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn kho xuất!", ""));
                this.CboKhoXuat.Focus();
            }
            else if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoNhap.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn kho nhập!", ""));
                this.CboKhoNhap.Focus();
            }
            else
            {
                if (this.VSHangHoa.Rows.Count > 1)
                {
                    int num = this.VSHangHoa.Rows.Count - 1;
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[num, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                    {
                        return;
                    }
                }
                C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                vSHangHoa.AddItem("");
                vSHangHoa[vSHangHoa.Rows.Count - 1, 14] = 0;
                vSHangHoa[vSHangHoa.Rows.Count - 1, 15] = 0;
                vSHangHoa.Select(this.VSHangHoa.Rows.Count - 1, 2);
                vSHangHoa.Focus();
                vSHangHoa = null;
                this.CboKhoXuat.Enabled = false;
            }
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if ((LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "") && LVYModule.ConfirmDelete(""))
            {
                this.objXCK.DeleteData(this.cFrmKhoa);
                this.EmptyData();
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if (this.VSHangHoa.Rows.Count != 1)
            {
                this.VSHangHoa.RemoveItem(this.VSHangHoa.Row);
                if (this.VSHangHoa.Rows.Count == 1)
                {
                    this.CboKhoXuat.Enabled = true;
                }
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
                this.cFrmTask = "";
                this.EnabledControl = true;
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_XuatChuyenKhoList.Show();
            MyProject.Forms.Frm_XuatChuyenKhoList.BringToFront();
        }

        private void CmdPrint_Click(object sender, EventArgs e)
        {
            ReportModule.PrintXuatChuyen(this.cFrmKhoa);
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                if (!this.SaveHHDetailsTemp())
                {
                    this.objXCK.ClearTemp(this.cFrmKhoa);
                }
                else if (Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.NotObject(this.UpdateData())))
                {
                    this.objXCK.ClearTemp(this.cFrmKhoa);
                }
                else
                {
                    this.objXCK.ClearTemp(this.cFrmKhoa);
                    this.EnabledControl = false;
                    this.cFrmTask = "";
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaOld, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            if (this.cFrmTask == "I")
            {
                this.objSoCT.UndoVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6));
            }
            this.cFrmTask = "";
            this.EnabledControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.TxtSoChungTu.Text = "";
            this.TxtNgayChungTu.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.CboLoaiTien.SelectedValue = "";
            this.txtTyGia.Value = 0;
            this.TxtDienGiai.Text = "";
            this.TxtNguoiGiao.Text = "";
            this.TxtNguoiNhan.Text = "";
            this.CboKhoNhap.SelectedValue = "";
            this.CboKhoXuat.SelectedValue = "";
            this.TxtTienHang.Value = 0;
            this.TxtTienHangNT.Value = 0;
            this.VSHangHoa.Rows.Count = 1;
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.txtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHangNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHang, modGeneral.H_FORMATNUMBER);
        }

        private void Frm_XuatChuyen_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keyCode = e.KeyCode;
            if (keyCode == Keys.Escape)
            {
                if (this.CmdExit.Enabled)
                {
                    this.CmdExit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F2)
            {
                if (this.CmdEdit.Enabled)
                {
                    this.CmdEdit_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F3)
            {
                this.CmdFind_Click(RuntimeHelpers.GetObjectValue(sender), e);
            }
            else if (keyCode == Keys.F8)
            {
                if (this.CmdAdd.Enabled)
                {
                    this.CmdAdd_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F9)
            {
                if (this.CmdDel.Enabled)
                {
                    this.CmdDel_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F10)
            {
                if (this.CmdSave.Enabled)
                {
                    this.CmdSave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if (keyCode == Keys.F11)
            {
                if (this.CmdUnsave.Enabled)
                {
                    this.CmdUnsave_Click(RuntimeHelpers.GetObjectValue(sender), e);
                }
            }
            else if ((keyCode == Keys.F12) && this.CmdPrint.Enabled)
            {
                this.CmdPrint_Click(RuntimeHelpers.GetObjectValue(sender), e);
            }
        }

        private void Frm_XuatChuyen_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnabledControl = false;
                this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                BuildComboModule.BuildCombo(this.CboKhoNhap, modGeneral.ListDanhMuc.KhoHang, false, "", "");
                BuildComboModule.BuildCombo(this.CboKhoXuat, modGeneral.ListDanhMuc.KhoHang, false, "", "");
                BuildComboModule.InitComboDatatype(this.CboLoaiDuLieu);
                this.PNDungChung.Visible = modGeneral.H_KETHOPDULIEUTHUE;
                C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                vSHangHoa.Cols[4].Visible = modGeneral.H_THEODOISERI;
                vSHangHoa.Cols[6].Visible = modGeneral.H_THEODOISOLOHANG;
                vSHangHoa.Cols[7].Visible = modGeneral.H_THEODOIHANDUNG;
                vSHangHoa.Cols[11].Editor = this.TxtSoLuong;
                vSHangHoa = null;
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.EmptyData();
                }
                else
                {
                    this.ShowData(this.cFrmKhoa);
                    this.LoadDetailsHangHoa(this.cFrmKhoa);
                }
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_XuatChuyen));
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.ToolStripButton2 = new ToolStripButton();
            this.TxtNguoiNhan = new TextBox();
            this.TxtNguoiGiao = new TextBox();
            this.CboKhoNhap = new ComboBox();
            this.Label7 = new Label();
            this.Label8 = new Label();
            this.CboKhoXuat = new ComboBox();
            this.Label2 = new Label();
            this.Label6 = new Label();
            this.TxtDienGiai = new TextBox();
            this.Label9 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.TxtSoChungTu = new TextBox();
            this.ImageList1 = new ImageList(this.components);
            this.VSHangHoa = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel1 = new Panel();
            this.C1NumericEdit1 = new C1NumericEdit();
            this.TxtSoLuong = new C1NumericEdit();
            this.TxtTienHangNT = new C1NumericEdit();
            this.TxtTienHang = new C1NumericEdit();
            this.Label5 = new Label();
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.PNDungChung = new Panel();
            this.CmdChuyen = new Button();
            this.CboLoaiDuLieu = new ComboBox();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.ToolStrip1.SuspendLayout();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            this.VSHangHoa.BeginInit();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.C1NumericEdit1).BeginInit();
            ((ISupportInitialize) this.TxtSoLuong).BeginInit();
            ((ISupportInitialize) this.TxtTienHangNT).BeginInit();
            ((ISupportInitialize) this.TxtTienHang).BeginInit();
            this.PNDungChung.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.SuspendLayout();
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.ToolStripButton2 });
            Point point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            Size size = new Size(0x37c, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x1a;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x52, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2d, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x37, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x43, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2d, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x37, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.ToolStripButton2.Alignment = ToolStripItemAlignment.Right;
            this.ToolStripButton2.Image = (Image) manager.GetObject("ToolStripButton2.Image");
            this.ToolStripButton2.ImageScaling = ToolStripItemImageScaling.None;
            this.ToolStripButton2.ImageTransparentColor = Color.White;
            this.ToolStripButton2.Name = "ToolStripButton2";
            size = new Size(0x31, 0x16);
            this.ToolStripButton2.Size = size;
            this.ToolStripButton2.Text = "&Help";
            point = new Point(0x1fa, 0x43);
            this.TxtNguoiNhan.Location = point;
            this.TxtNguoiNhan.Name = "TxtNguoiNhan";
            size = new Size(0x120, 20);
            this.TxtNguoiNhan.Size = size;
            this.TxtNguoiNhan.TabIndex = 15;
            point = new Point(0x1fa, 0x29);
            this.TxtNguoiGiao.Location = point;
            this.TxtNguoiGiao.Name = "TxtNguoiGiao";
            size = new Size(0x120, 20);
            this.TxtNguoiGiao.Size = size;
            this.TxtNguoiGiao.TabIndex = 13;
            this.CboKhoNhap.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboKhoNhap.FormattingEnabled = true;
            point = new Point(0x79, 0x43);
            this.CboKhoNhap.Location = point;
            this.CboKhoNhap.Name = "CboKhoNhap";
            size = new Size(0x120, 0x15);
            this.CboKhoNhap.Size = size;
            this.CboKhoNhap.TabIndex = 7;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(0x24, 0x45);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x35, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 6;
            this.Label7.Text = "Kho nhập";
            this.Label8.AutoSize = true;
            this.Label8.BackColor = Color.Transparent;
            point = new Point(0x1ad, 0x48);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x3e, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 14;
            this.Label8.Text = "Người nhận";
            this.CboKhoXuat.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboKhoXuat.FormattingEnabled = true;
            point = new Point(0x79, 40);
            this.CboKhoXuat.Location = point;
            this.CboKhoXuat.Name = "CboKhoXuat";
            size = new Size(0x120, 0x15);
            this.CboKhoXuat.Size = size;
            this.CboKhoXuat.TabIndex = 5;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x24, 0x2b);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x31, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 4;
            this.Label2.Text = "Kho xuất";
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new Point(0x1ad, 0x2c);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x3a, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 12;
            this.Label6.Text = "Người giao";
            point = new Point(0x79, 0x5d);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Name = "TxtDienGiai";
            size = new Size(0x2a1, 20);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 0x11;
            this.Label9.AutoEllipsis = true;
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(0x24, 0x60);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            this.Label9.RightToLeft = RightToLeft.No;
            size = new Size(0x30, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x10;
            this.Label9.Text = "Diễn giải";
            this.Label9.TextAlign = ContentAlignment.TopRight;
            this.CboLoaiTien.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x1fa, 14);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x6c, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 9;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x2ae, 14);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            Padding padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(0x6c, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 11;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(0x1ad, 0x10);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 8;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(0x26a, 0x11);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 10;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(0xeb, 0x10);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 2;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Custom;
            point = new Point(0x138, 13);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x61, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 3;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x24, 0x10);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x41, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0;
            this.Label1.Text = "Số chứng từ";
            point = new Point(0x79, 13);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            size = new Size(0x6c, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 1;
            this.ImageList1.ImageStream = (ImageListStreamer) manager.GetObject("ImageList1.ImageStream");
            this.ImageList1.TransparentColor = Color.Transparent;
            this.ImageList1.Images.SetKeyName(0, "orders_main.png");
            this.ImageList1.Images.SetKeyName(1, "checkingacct.png");
            this.ImageList1.Images.SetKeyName(2, "billing.png");
            this.VSHangHoa.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSHangHoa.ColumnInfo = manager.GetString("VSHangHoa.ColumnInfo");
            this.VSHangHoa.Dock = DockStyle.Fill;
            this.VSHangHoa.ExtendLastCol = true;
            this.VSHangHoa.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0);
            this.VSHangHoa.Location = point;
            padding = new Padding(0);
            this.VSHangHoa.Margin = padding;
            this.VSHangHoa.Name = "VSHangHoa";
            this.VSHangHoa.Rows.Count = 1;
            this.VSHangHoa.Rows.DefaultSize = 0x11;
            this.VSHangHoa.Rows.MaxSize = 20;
            this.VSHangHoa.Rows.MinSize = 20;
            size = new Size(890, 0x145);
            this.VSHangHoa.Size = size;
            this.VSHangHoa.StyleInfo = manager.GetString("VSHangHoa.StyleInfo");
            this.VSHangHoa.TabIndex = 0x11;
            this.VSHangHoa.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.C1NumericEdit1);
            this.Panel1.Controls.Add(this.TxtSoLuong);
            this.Panel1.Controls.Add(this.TxtTienHangNT);
            this.Panel1.Controls.Add(this.TxtTienHang);
            this.Panel1.Controls.Add(this.Label5);
            this.Panel1.Controls.Add(this.CmdDelRow);
            this.Panel1.Controls.Add(this.CmdAddRow);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x20c);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x37c, 0x2b);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x1d;
            this.C1NumericEdit1.BorderStyle = BorderStyle.FixedSingle;
            this.C1NumericEdit1.DataType = typeof(double);
            this.C1NumericEdit1.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x194, 0x33);
            this.C1NumericEdit1.Location = point;
            this.C1NumericEdit1.Name = "C1NumericEdit1";
            padding = new Padding(1);
            this.C1NumericEdit1.Padding = padding;
            size = new Size(0x55, 20);
            this.C1NumericEdit1.Size = size;
            this.C1NumericEdit1.TabIndex = 0xa5;
            this.C1NumericEdit1.Tag = null;
            this.C1NumericEdit1.TextAlign = HorizontalAlignment.Right;
            this.C1NumericEdit1.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.C1NumericEdit1.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.C1NumericEdit1.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoLuong.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoLuong.DataType = typeof(double);
            this.TxtSoLuong.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x194, 0x2f);
            this.TxtSoLuong.Location = point;
            this.TxtSoLuong.Name = "TxtSoLuong";
            padding = new Padding(1);
            this.TxtSoLuong.Padding = padding;
            size = new Size(0x55, 20);
            this.TxtSoLuong.Size = size;
            this.TxtSoLuong.TabIndex = 0xa4;
            this.TxtSoLuong.Tag = null;
            this.TxtSoLuong.TextAlign = HorizontalAlignment.Right;
            this.TxtSoLuong.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.TxtSoLuong.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoLuong.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHangNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHangNT.DataType = typeof(double);
            this.TxtTienHangNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x29a, 7);
            this.TxtTienHangNT.Location = point;
            this.TxtTienHangNT.Name = "TxtTienHangNT";
            padding = new Padding(1);
            this.TxtTienHangNT.Padding = padding;
            this.TxtTienHangNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienHangNT.Size = size;
            this.TxtTienHangNT.TabIndex = 0x88;
            this.TxtTienHangNT.Tag = null;
            this.TxtTienHangNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHangNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHangNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHangNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHang.DataType = typeof(double);
            this.TxtTienHang.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x306, 7);
            this.TxtTienHang.Location = point;
            this.TxtTienHang.Name = "TxtTienHang";
            padding = new Padding(1);
            this.TxtTienHang.Padding = padding;
            this.TxtTienHang.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienHang.Size = size;
            this.TxtTienHang.TabIndex = 0x87;
            this.TxtTienHang.Tag = null;
            this.TxtTienHang.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHang.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHang.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(0x254, 9);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x37, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x86;
            this.Label5.Text = "Tiền h\x00e0ng";
            this.CmdDelRow.Image = (Image) manager.GetObject("CmdDelRow.Image");
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x62, 6);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(90, 0x18);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 0x16;
            this.CmdDelRow.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = (Image) manager.GetObject("CmdAddRow.Image");
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(3, 6);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(0x5d, 0x18);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 0x15;
            this.CmdAddRow.Text = "&1.Th\x00eam d\x00f2ng";
            this.CmdAddRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.PNDungChung.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.PNDungChung.Controls.Add(this.CmdChuyen);
            this.PNDungChung.Controls.Add(this.CboLoaiDuLieu);
            point = new Point(0x25f, 0x19);
            this.PNDungChung.Location = point;
            this.PNDungChung.Name = "PNDungChung";
            size = new Size(280, 0x17);
            this.PNDungChung.Size = size;
            this.PNDungChung.TabIndex = 30;
            this.PNDungChung.Visible = false;
            this.CmdChuyen.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            point = new Point(0xfd, 0);
            this.CmdChuyen.Location = point;
            this.CmdChuyen.Name = "CmdChuyen";
            size = new Size(0x18, 0x17);
            this.CmdChuyen.Size = size;
            this.CmdChuyen.TabIndex = 14;
            this.CmdChuyen.Text = ">";
            this.CmdChuyen.UseVisualStyleBackColor = true;
            this.CboLoaiDuLieu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiDuLieu.FormattingEnabled = true;
            point = new Point(90, 1);
            this.CboLoaiDuLieu.Location = point;
            this.CboLoaiDuLieu.Name = "CboLoaiDuLieu";
            size = new Size(0xa3, 0x15);
            this.CboLoaiDuLieu.Size = size;
            this.CboLoaiDuLieu.TabIndex = 13;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0xad);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x37c, 0x15f);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x12;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.VSHangHoa);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(890, 0x145);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Chi tiết h\x00e0ng h\x00f3a";
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab2.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x37c, 0x94);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 0x1f;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.TxtNguoiNhan);
            this.C1DockingTabPage2.Controls.Add(this.TxtNgayChungTu);
            this.C1DockingTabPage2.Controls.Add(this.TxtNguoiGiao);
            this.C1DockingTabPage2.Controls.Add(this.TxtSoChungTu);
            this.C1DockingTabPage2.Controls.Add(this.CboKhoNhap);
            this.C1DockingTabPage2.Controls.Add(this.Label1);
            this.C1DockingTabPage2.Controls.Add(this.Label7);
            this.C1DockingTabPage2.Controls.Add(this.Label13);
            this.C1DockingTabPage2.Controls.Add(this.Label8);
            this.C1DockingTabPage2.Controls.Add(this.Label10);
            this.C1DockingTabPage2.Controls.Add(this.CboKhoXuat);
            this.C1DockingTabPage2.Controls.Add(this.Label11);
            this.C1DockingTabPage2.Controls.Add(this.Label2);
            this.C1DockingTabPage2.Controls.Add(this.txtTyGia);
            this.C1DockingTabPage2.Controls.Add(this.Label6);
            this.C1DockingTabPage2.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage2.Controls.Add(this.TxtDienGiai);
            this.C1DockingTabPage2.Controls.Add(this.Label9);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(890, 0x7a);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "Th\x00f4ng tin phiếu xuất chuyển kho";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37c, 0x237);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.PNDungChung);
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.KeyPreview = true;
            this.Name = "Frm_XuatChuyen";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "ST-0002";
            this.Text = "XUAT CHUYEN KHO";
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            this.VSHangHoa.EndInit();
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            ((ISupportInitialize) this.C1NumericEdit1).EndInit();
            ((ISupportInitialize) this.TxtSoLuong).EndInit();
            ((ISupportInitialize) this.TxtTienHangNT).EndInit();
            ((ISupportInitialize) this.TxtTienHang).EndInit();
            this.PNDungChung.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.C1DockingTabPage2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public bool LoadDetailsHangHoa(string pKhoaPhieuXuat)
        {
            DataTable listDetails = this.objXCK.GetListDetails(this.cFrmKhoa);
            if (listDetails == null)
            {
                bool flag=false;
                return flag;
            }
            this.VSHangHoa.Rows.Count = 1;
            int num2 = listDetails.Rows.Count - 1;
            for (int i = 0; i <= num2; i++)
            {
                C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                vSHangHoa.AddItem("");
                vSHangHoa[vSHangHoa.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Khoa"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaHangHoa"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Ma"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["HangHoa"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoSeri"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["NgayNhap"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLo"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 7] = LVYModule.Char2Date(Conversions.ToString(listDetails.Rows[i]["HanSuDung"]));
                vSHangHoa[vSHangHoa.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaDonviTinh"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonViTinh"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["QuyCach"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLuong"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonGia"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["ThanhTien"]);
                vSHangHoa[vSHangHoa.Rows.Count - 1, 14] = 0;
                vSHangHoa[vSHangHoa.Rows.Count - 1, 15] = 0;
                vSHangHoa = null;
            }
            this.TinhTong();
            return true;
        }

        public bool SaveHHDetailsTemp()
        {
            double num2 = 0.0;
            num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            clsXuatChuyenKhoChiTiet objXCKCT = this.objXCKCT;
            int num3 = this.VSHangHoa.Rows.Count - 1;
            for (int i = 1; i <= num3; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.VSHangHoa[i, 0] = modGeneral.CreatKey("ST_XuatChuyenKhoChiTiet", 15, "");
                }
                objXCKCT.Khoa = this.VSHangHoa[i, 0].ToString().Trim();
                objXCKCT.KhoaPhieuXuat = this.cFrmKhoa;
                objXCKCT.KhoaKhoNhap = Conversions.ToString(this.CboKhoNhap.SelectedValue);
                objXCKCT.KhoaKhoXuat = Conversions.ToString(this.CboKhoXuat.SelectedValue);
                objXCKCT.KhoaHangHoa = this.VSHangHoa[i, 1].ToString().Trim();
                objXCKCT.NgayXuatChuyen = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
                objXCKCT.SoSeri = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 4]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objXCKCT.NgayNhap = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 5]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objXCKCT.HanSuDung = LVYModule.Date2Char(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 7]), "", modGeneral.TypeOfValue.Nothing).ToString());
                objXCKCT.SoLoHang = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 6]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objXCKCT.KhoaDonViTinh = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 8]), "", modGeneral.TypeOfValue.Nothing).ToString();
                objXCKCT.QuyCach = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 10]), "", modGeneral.TypeOfValue.Nothing).ToString());
                objXCKCT.SoLuong = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 11]), 0, modGeneral.TypeOfValue.Nothing));
                objXCKCT.GiaVonNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 12]), 0, modGeneral.TypeOfValue.Nothing));
                objXCKCT.GiaVon = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 12]), 0, modGeneral.TypeOfValue.Nothing));
                objXCKCT.TienVonNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 13]), 0, modGeneral.TypeOfValue.Nothing)) / num2;
                objXCKCT.TienVon = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSHangHoa[i, 13]), 0, modGeneral.TypeOfValue.Nothing));
                if (!objXCKCT.Save())
                {
                    return false;
                }
            }
            objXCKCT = null;
            return true;
        }

        public void ShowData(string pKhoa)
        {
            if (this.objXCK.Load(pKhoa))
            {
                clsXuatChuyenKho objXCK = this.objXCK;
                this.cFrmKhoa = objXCK.Khoa;
                this.TxtSoChungTu.Text = objXCK.SoChungTu;
                this.TxtNgayChungTu.Text = LVYModule.Char2Date(objXCK.NgayChungTu);
                this.CboLoaiTien.SelectedValue = objXCK.LoaiTien;
                this.txtTyGia.Value = objXCK.TyGia;
                this.TxtDienGiai.Text = objXCK.DienGiai;
                this.TxtNguoiGiao.Text = objXCK.NguoiGiao;
                this.TxtNguoiNhan.Text = objXCK.NguoiNhan;
                this.CboKhoNhap.SelectedValue = objXCK.KhoaDonViNhap;
                this.CboKhoXuat.SelectedValue = objXCK.KhoaDonViXuat;
                this.CboLoaiDuLieu.SelectedValue = objXCK.DuLieu;
                objXCK = null;
            }
        }

        public void TinhTienVon(int nRow)
        {
            double num = 0.0;
            double num3 = 0.0;
            double num2 = 0.0;
            C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSHangHoa[nRow, 12]), 0, modGeneral.TypeOfValue.Nothing));
            num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSHangHoa[nRow, 11]), 0, modGeneral.TypeOfValue.Nothing));
            num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSHangHoa[nRow, 10]), 1, modGeneral.TypeOfValue.Nothing));
            vSHangHoa[nRow, 13] = (num * num3) * num2;
            vSHangHoa = null;
        }

        public void TinhTong()
        {
            double num = 0.0;
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            this.TxtTienHangNT.Value = LVYModule.SumColGrid(this.VSHangHoa, 13);
            this.TxtTienHang.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienHangNT.Value), 0, modGeneral.TypeOfValue.Nothing)) * num;
        }

        public object UpdateData()
        {
            object obj2;
            clsXuatChuyenKho objXCK = this.objXCK;
            objXCK.Khoa = this.cFrmKhoa;
            objXCK.SoChungTu = this.TxtSoChungTu.Text.Trim();
            objXCK.NgayChungTu = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objXCK.KhoaDonViNhap = Conversions.ToString(this.CboKhoNhap.SelectedValue);
            objXCK.KhoaDonViXuat = Conversions.ToString(this.CboKhoXuat.SelectedValue);
            objXCK.NguoiNhan = this.TxtNguoiNhan.Text;
            objXCK.NguoiGiao = this.TxtNguoiGiao.Text;
            objXCK.LoaiTien = this.CboLoaiTien.SelectedValue.ToString().Trim();
            objXCK.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            objXCK.DienGiai = this.TxtDienGiai.Text.ToString().Trim();
            objXCK.KhoaDonVi = modGeneral.H_CLIENT;
            objXCK.SoTienNT = Conversions.ToDouble(this.TxtTienHangNT.Value);
            objXCK.SoTien = Conversions.ToDouble(this.TxtTienHang.Value);
            objXCK.Send = 0;
            objXCK.DuLieu = Conversions.ToString(this.CboLoaiDuLieu.SelectedValue);
            return objXCK.Save();
            objXCK = null;
            return obj2;
        }

        private void VSHangHoa_AfterEdit(object sender, RowColEventArgs e)
        {
            switch (e.Col)
            {
                case 9:
                    this.TinhTienVon(e.Row);
                    break;

                case 10:
                    this.TinhTienVon(e.Row);
                    break;

                case 11:
                    this.TinhTienVon(e.Row);
                    break;

                case 12:
                    this.TinhTienVon(e.Row);
                    break;
            }
            this.TinhTong();
        }

        private void VSHangHoa_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (!this.mEnabledControl)
            {
                e.Cancel = true;
            }
            if (((e.Col != 9) & (e.Col != 11)) & (e.Col != 2))
            {
                e.Cancel = true;
            }
        }

        private void VSHangHoa_CellButtonClick(object sender, RowColEventArgs e)
        {
            object obj2;
            switch (e.Col)
            {
                case 2:
                    obj2 = SearchModule.SearchGoodsInStock(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoXuat.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), "", true);
                    if (obj2 != null)
                    {
                        if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null)), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                        {
                            this.objHH.Load(Conversions.ToString(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null)));
                            this.pDT = this.objHH.GetHangHoa(Conversions.ToString(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null)));
                            this.objDVT.Load(this.objHH.KhoaDonViTinh);
                            C1.Win.C1FlexGrid.C1FlexGrid vSHangHoa = this.VSHangHoa;
                            vSHangHoa[e.Row, 1] = this.objHH.Khoa;
                            vSHangHoa[e.Row, 2] = this.objHH.Ma;
                            if (modGeneral.H_LANGUAGE == "VIET")
                            {
                                vSHangHoa[e.Row, 3] = this.objHH.TenViet;
                                vSHangHoa[e.Row, 9] = this.objDVT.TenViet;
                            }
                            else
                            {
                                vSHangHoa[e.Row, 3] = this.objHH.TenAnh;
                                vSHangHoa[e.Row, 9] = this.objDVT.TenAnh;
                            }
                            vSHangHoa[e.Row, 4] = "";
                            vSHangHoa[e.Row, 5] = NewLateBinding.LateIndexGet(obj2, new object[] { 3 }, null).ToString().Trim();
                            vSHangHoa[e.Row, 6] = NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null).ToString().Trim();
                            vSHangHoa[e.Row, 7] = LVYModule.Char2Date(NewLateBinding.LateIndexGet(obj2, new object[] { 4 }, null).ToString().Trim());
                            vSHangHoa[e.Row, 8] = this.objHH.KhoaDonViTinh;
                            vSHangHoa[e.Row, 10] = 1;
                            vSHangHoa[e.Row, 11] = 1;
                            vSHangHoa[e.Row, 12] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 7 }, null)), 0, modGeneral.TypeOfValue.Nothing));
                            vSHangHoa[e.Row, 13] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 7 }, null)), 0, modGeneral.TypeOfValue.Nothing));
                            vSHangHoa = null;
                        }
                        break;
                    }
                    break;

                case 8:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid grid2 = this.VSHangHoa;
                    obj2 = SearchModule.SearchDVT(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(grid2[e.Row, 4]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), this.VSHangHoa, e.Row, e.Col, LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(grid2[e.Row, 7]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim());
                    if (obj2 != null)
                    {
                        if (Information.UBound((Array) obj2, 1) >= 2)
                        {
                            grid2[e.Row, 7] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                            grid2[e.Row, 8] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                        }
                        grid2.Select(e.Row, 8);
                        grid2 = null;
                        break;
                    }
                    break;
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit1 = value;
            }
        }

        internal virtual ComboBox CboKhoNhap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKhoNhap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboKhoNhap_SelectedIndexChanged);
                if (this._CboKhoNhap != null)
                {
                    this._CboKhoNhap.SelectedIndexChanged -= handler;
                }
                this._CboKhoNhap = value;
                if (this._CboKhoNhap != null)
                {
                    this._CboKhoNhap.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboKhoXuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKhoXuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKhoXuat = value;
            }
        }

        internal virtual ComboBox CboLoaiDuLieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiDuLieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiDuLieu = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual Button CmdChuyen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChuyen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdChuyen = value;
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_Click);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdAddRow.Enabled = value;
                this.CmdDelRow.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.TxtSoChungTu.ReadOnly = !value;
                this.TxtNgayChungTu.Enabled = value;
                this.CboLoaiTien.Enabled = value;
                this.txtTyGia.ReadOnly = !value;
                this.TxtDienGiai.ReadOnly = !value;
                this.CboKhoNhap.Enabled = value;
                this.CboKhoXuat.Enabled = value;
                this.TxtNguoiGiao.ReadOnly = !value;
                this.TxtNguoiNhan.ReadOnly = !value;
                this.CboLoaiDuLieu.Enabled = value;
                this.CmdChuyen.Enabled = !value;
            }
        }

        internal virtual ImageList ImageList1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImageList1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImageList1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel PNDungChung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PNDungChung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PNDungChung = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripButton ToolStripButton2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDienGiai = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual TextBox TxtNguoiGiao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguoiGiao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguoiGiao = value;
            }
        }

        internal virtual TextBox TxtNguoiNhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguoiNhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguoiNhan = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual C1NumericEdit TxtSoLuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoLuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoLuong = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHang = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHangNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHangNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHangNT = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSHangHoa_BeforeEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSHangHoa_AfterEdit);
                RowColEventHandler handler3 = new RowColEventHandler(this.VSHangHoa_CellButtonClick);
                if (this._VSHangHoa != null)
                {
                    this._VSHangHoa.BeforeEdit -= handler;
                    this._VSHangHoa.AfterEdit -= handler2;
                    this._VSHangHoa.CellButtonClick -= handler3;
                }
                this._VSHangHoa = value;
                if (this._VSHangHoa != null)
                {
                    this._VSHangHoa.BeforeEdit += handler;
                    this._VSHangHoa.AfterEdit += handler2;
                    this._VSHangHoa.CellButtonClick += handler3;
                }
            }
        }
    }
}

